package com.wlgc.service.impl;

import com.wlgc.entity.RestBean;
import com.wlgc.service.IsNullService;
import org.springframework.stereotype.Service;

@Service
public class IsNullServiceImpl implements IsNullService {
    @Override
    public int IsNull_RU(String id, String username, String password, String email, String verifyCode) {
        if (id.isEmpty()) return 1;
        if (username.isEmpty()) return 2;
        if (email.isEmpty()) return 3;
        if (verifyCode.isEmpty()) return 4;
        if (password.isEmpty()) return 5;
        return 0;
    }

    public RestBean returnNull_RU(int i)
    {
        if (i==1) return new RestBean(500, "请输入学号");
        if (i==2) return new RestBean(500, "请输入用户名！");
        if (i==3) return new RestBean(500, "请输入邮箱");
        if (i==4) return new RestBean(500, "请输入验证码");
         return new RestBean(500, "请输入密码");

    }

}
